package com.suma.platform.core.dto;

import com.suma.platform.core.enums.SeckillStatEnum;
import com.suma.platform.core.model.SeckillRecord;

/**
 * @author suma
 * @date 2018/2/12 上午10:10
 */
public class SeckillExecution {
	private long seckillId;

	private int state;

	private String stateInfo;

	private SeckillRecord seckillRecord;

	public SeckillExecution(long seckillId, SeckillStatEnum statEnum) {
		this.seckillId = seckillId;
		this.state = statEnum.getState();
		this.stateInfo = statEnum.getStateInfo();
	}

	public SeckillExecution(long seckillId, SeckillStatEnum statEnum, SeckillRecord seckillRecord) {
		this.seckillId = seckillId;
		this.state = statEnum.getState();
		this.stateInfo = statEnum.getStateInfo();
		this.seckillRecord = seckillRecord;
	}

	public long getSeckillId() {
		return seckillId;
	}

	public void setSeckillId(long seckillId) {
		this.seckillId = seckillId;
	}

	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

	public String getStateInfo() {
		return stateInfo;
	}

	public void setStateInfo(String stateInfo) {
		this.stateInfo = stateInfo;
	}

	public SeckillRecord getSeckillRecord() {
		return seckillRecord;
	}

	public void setSeckillRecord(SeckillRecord seckillRecord) {
		this.seckillRecord = seckillRecord;
	}

	@Override
	public String toString() {
		return "SeckillExecution{" + "seckillId=" + seckillId + ", state=" + state + ", stateInfo='" + stateInfo + '\'' + ", seckillRecord=" + seckillRecord + '}';
	}
}
